package com.micromap.dataprocessing.domain

import java.time.LocalDate
import javax.persistence.Entity
import javax.persistence.Id
import javax.persistence.Table

@Entity
@Table(name = "T_AAA_MENU")
class Menu {
    //"菜单ID"
    @Id
    var menuId: Long? = null
    //"菜单名称"
    var name: String? = null
    //"描述"
    var des: String? = null
    //"编码"
    var code: String? = null
    //"0=禁用，1=启用 "
    var enabled: Int? = null
    //"排序"
    var orderId: Long? = null
    //"应用ID"
    var appId: Long? = null
    //"页面ID"
    var pageId: Long? = null
    //"事务代码"
    var tranCode: String? = null
    //"URL"
    var url: String? = null
    var version: Long? = null
    var crtUserId: String? = null
    var crtUserName: String? = null
    var crtDate: LocalDate? = null
    var mntUserId: String? = null
    var mntUserName: String? = null
    var mntDate: LocalDate? = null
    var imgpath: String? = null

    override fun equals(other: Any?): Boolean {
        if (this === other) return true
        if (javaClass != other?.javaClass) return false

        other as Menu

        if (menuId != other.menuId) return false

        return true
    }

    override fun hashCode(): Int = menuId?.hashCode() ?: 0


}
